<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Map" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<script type="text/javascript">

    //<![CDATA[

    var map;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        
        map.setCenter(new GLatLng(<% Response.Write( getActualCoordinate( getAuthorizedUser() ) ) %>), 13);
        
        drawTripsOnMap();
        
        createMarkers();
      }
    }
    
    function drawTripsOnMap() {
        <%
        Response.Write(printGPolylines())
        %>
    }
    
    // Creates a marker at the given point with the given number label
    function createMarkers() {
        <%
        Response.Write( printMarkers() )
        %>
    }
    
    //]]>
    </script>

    <asp:Panel ID="Panel1" runat="server" Height="23px" HorizontalAlign="Center" Width="100%">


    <asp:Button ID="Button1" runat="server" Text="Actualize map!" /></asp:Panel>
    <br />

        <div class="container">
            <div class="users">
            <%
                Response.Write(printUserColor())
            %>
            </div>
            <div id="map" class="map"></div>
        </div>

</asp:Content>